package app.kafka.produce;

import java.util.Properties;
import java.util.concurrent.Future;

import org.apache.kafka.clients.producer.Callback;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;

/**
 * 测试发送Dis的主题数据
 * @author lfy.xys
 * @date 2018年5月31日
 *
 */
public class TestDisProducer2 {

	public static void main(String[] args) {
		String key = "key";
		String msg = "---------------1111111111";
		
//		String topic1 = "topic_1";
//		TestDisProducer a = new TestDisProducer();
//		a.produce(topic1, key, msg);
//		System.out.println("发送了1111");
		
		String topic2 = "test";
		TestDisProducer b = new TestDisProducer();
		b.produce(topic2, key, msg);
		System.out.println("发送了test");
	}
}
